package cn.me.alphamq.common.entity;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * 主从复制中从节点复制完毕后返回的 ack 实体
 * TODO 就一个 needAckCount 属性，值得被封装成一个对象吗？
 *
 * @author f
 */
public class SlaveAckEntity {

    /**
     * 还需要接收的 ack 事件的数量
     */
    private AtomicInteger needAckCount;

    public SlaveAckEntity(int needAckCount) {
        this.needAckCount = new AtomicInteger(needAckCount);
    }

    public AtomicInteger getNeedAckCount() {
        return needAckCount;
    }

    public void setNeedAckCount(AtomicInteger needAckCount) {
        this.needAckCount = needAckCount;
    }
}
